package 题目集.二分;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class ch02_切绳子 {
    static long[] nums;
    static int n;
    static long max;  //不考虑正确的情况下，最多每段可以且成max的长度，即右边界
    static long min = 0;  // 至少能且成min的长度，即左边界

    public static void main(String[] args) {
        Reader sc = new Reader();
        nums = new long[sc.nextInt()];
        n = sc.nextInt();
        long sum = 0;
        for (int i = 0; i < nums.length; i++) {
            nums[i] = (long) (sc.nextDouble()*100);
            sum += nums[i];
        }
        max = sum / n;
        System.out.printf("%.2f\n",binarySearch()*1.0/100);
    }

    /**
     * 找min-max中，能分成n段的最大长度
     * @return
     */
    public static long binarySearch(){
        while(max>=min){
            long mid= (max+min)/2;
            if (isSplit(mid)) { //如果能分成n段，则尝试更大的长度
                min = mid+1;
            }else {
                max = mid-1;
            }
        }
        return max;
    }

    /**
     * 每段且成x的长度，是否能切成n段
     */
    public static boolean isSplit(double x) {
        int count = 0;
        for (double num : nums) {
            count += (int) (num / x);
        }
        return count >= n;
    }

    static class Reader {
        private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        private StringTokenizer tokenizer = new StringTokenizer("");

        private String innerNextLine() {
            try {
                return reader.readLine();
            } catch (IOException ex) {
                return null;
            }
        }

        public boolean hasNext() {
            while (!tokenizer.hasMoreTokens()) {    //内存中没有
                String nextLine = innerNextLine();
                if (nextLine == null) {     //且没有下一行
                    return false;
                }
                tokenizer = new StringTokenizer(nextLine);  //读入一行
            }
            return true;
        }

        public String nextLine() {
            tokenizer = new StringTokenizer("");    //清空内存中的字符
            return innerNextLine();
        }
        public void clear(){
            tokenizer = new StringTokenizer("");
        }

        public String next() {
            hasNext();
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble(){
            return Double.parseDouble(next());
        }
    }

}
